/*
 * @Author: zhangzhen
 * @Date: 2022-08-12 09:09:51
 * @LastEditors: zhangzhen
 * @LastEditTime: 2022-08-12 09:54:30
 *
 */
import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux'
import type { RootState, AppDispatch } from './store'

// use hook 节约每次引入type的工作
// useSelector: 节约配置RootState type

export const useAppDispatch = () => useDispatch<AppDispatch>()
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector
